// 引入当前文件夹所有sql实体
const fs = require('fs')
const files = fs.readdirSync(__dirname)
const self = __filename.substring(__dirname.length + 1)
files.forEach(filename => {
    if (filename == self || filename == 'utils.js') return
    let position = filename.lastIndexOf('.')
    if (position == -1) return
    const filePreName = filename.substring(0, position)
    const fileType = filename.substring(position)
    if (!filePreName.length || !fileType.length || fileType !== '.js') return
    console.log(filePreName, fileType)
    const model = require(__dirname + '/' + filePreName)
    console.log(model, 1)
})